package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DingdanMapper;
import com.ruoyi.system.domain.Dingdan;
import com.ruoyi.system.service.IDingdanService;

/**
 * 订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-13
 */
@Service
public class DingdanServiceImpl implements IDingdanService 
{
    @Autowired
    private DingdanMapper dingdanMapper;

    /**
     * 查询订单
     * 
     * @param ddId 订单主键
     * @return 订单
     */
    @Override
    public Dingdan selectDingdanByDdId(Long ddId)
    {
        return dingdanMapper.selectDingdanByDdId(ddId);
    }

    /**
     * 查询订单列表
     * 
     * @param dingdan 订单
     * @return 订单
     */
    @Override
    public List<Dingdan> selectDingdanList(Dingdan dingdan)
    {
        return dingdanMapper.selectDingdanList(dingdan);
    }

    @Override
    public List<Dingdan> selectDingdanListAll(Dingdan dingdan) {
        return dingdanMapper.selectDingdanListAll(dingdan);
    }

    /**
     * 新增订单
     * 
     * @param dingdan 订单
     * @return 结果
     */
    @Override
    public int insertDingdan(Dingdan dingdan)
    {
        return dingdanMapper.insertDingdan(dingdan);
    }

    /**
     * 修改订单
     * 
     * @param dingdan 订单
     * @return 结果
     */
    @Override
    public int updateDingdan(Dingdan dingdan)
    {
        return dingdanMapper.updateDingdan(dingdan);
    }

    /**
     * 批量删除订单
     * 
     * @param ddIds 需要删除的订单主键
     * @return 结果
     */
    @Override
    public int deleteDingdanByDdIds(Long[] ddIds)
    {
        return dingdanMapper.deleteDingdanByDdIds(ddIds);
    }

    /**
     * 删除订单信息
     * 
     * @param ddId 订单主键
     * @return 结果
     */
    @Override
    public int deleteDingdanByDdId(Long ddId)
    {
        return dingdanMapper.deleteDingdanByDdId(ddId);
    }
}
